Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications


Preface

This Preface contains the following sections:

Purpose

This manual provides an overview the tools and the programming techniques that enable you to develop and deploy OpenEdge® WebSpeed® applications. WebSpeed applications support full business transactions between a Web browser and a Web server.

Audience

To understand this manual you should be a computer programmer experienced in developing Web applications. You should be thoroughly familiar with HyperText Markup Language (HTML), HyperText Transfer Protocol (HTTP), and Common Gateway Interface (CGI) programming. Fluency with block-structured languages (such as Pascal, C/C++, Visual Basic, or Progress® 4GL), object-oriented programming, and event-driven programming are helpful but not necessary.

Organization

Chapter 1 "Developing with WebSpeed"

Discusses WebSpeed as a part of developing Web applications. This chapter also discusses WebSpeed in context with the rest of the OpenEdge platform and the OpenEdge Reference Architecture.

Chapter 2 "Web Objects"

Describes several simple Web Objects that illustrate some basic WebSpeed techniques and concepts.

Chapter 3 "SpeedScript"

Describes the SpeedScript programming language and how to build Web objects with embedded SpeedScript.

Chapter 4 "Handling DISPLAY Output"

Describes how to use and modify the default formatting for Web object output generated by the DISPLAY statement.

Chapter 5 "Generating HTML Visualizations"

Describes how to generate HTML visualizations, using the installed custom tag and template for generating HTML tables as an example.

Chapter 6 "Using JavaScript with WebSpeed"

Provides information on how to incorporate JavaScript into WebSpeed applications.

Chapter 7 "Controlling WebSpeed Transactions"

Describes Web object states and how to implement them with the different types of WebSpeed Web objects.

Chapter 8 "Controlling Database Transactions"

Describes how SpeedScript controls database transactions and how you can use state-aware Web objects to control multi-page database transactions on the Web.

Chapter 9 "Debugging Applications"

Provides basic information on WebSpeed debugging techniques.

Appendix A "WebSpeed API reference."

Describes the WebSpeed PUBLIC API functions and procedures.

Typographical conventions

This manual uses the following typographical conventions:

Convention
Description
Bold
Bold typeface indicates commands or characters the user types, or the names of user interface elements.
Italic
Italic typeface indicates the title of a document, or signifies new terms.
SMALL, BOLD CAPITAL LETTERS
Small, bold capital letters indicate OpenEdge® key functions and generic keyboard keys; for example, GET and CTRL.
KEY1-KEY2
A hyphen between key names indicates a simultaneous key sequence: you press and hold down the first key while pressing the second key. For example, CTRL-X.
KEY1 KEY2
A space between key names indicates a sequential key sequence: you press and release the first key, then press another key. For example, ESCAPE H.
Syntax:
Fixed width 
A fixed-width font is used in syntax statements, code examples, and for system output and filenames.
Fixed-width italics
Fixed-width italics indicate variables in syntax statements.
Fixed-width bold
Fixed-width bold indicates variables with special emphasis.
UPPERCASE 
fixed width 
Uppercase words are Progress® 4GL language keywords. Although these always are shown in uppercase, you can type them in either uppercase or lowercase in a procedure.
 
This icon (three arrows) introduces a multi-step procedure.
 
This icon (one arrow) introduces a single-step procedure.
Period (.)
or
colon (:)
All statements except DO, FOR, FUNCTION, PROCEDURE, and REPEAT end with a period. DO, FOR, FUNCTION, PROCEDURE, and REPEAT statements can end with either a period or a colon.
[ ]
Large brackets indicate the items within them are optional.
[ ]
Small brackets are part of the Progress 4GL language.
{ }
Large braces indicate the items within them are required. They are used to simplify complex syntax diagrams.
{ }
Small braces are part of the Progress 4GL language. For example, a called external procedure must use braces when referencing arguments passed by a calling procedure.
|
A vertical bar indicates a choice.
...
Ellipses indicate repetition: you can choose one or more of the preceding items.

Examples of syntax descriptions

In this example, ACCUM is a keyword, and aggregate and expression are variables:

Syntax
ACCUM aggregate expression  

FOR is one of the statements that can end with either a period or a colon, as in this example:

FOR EACH Customer: 
  DISPLAY Name. 
END. 

In this example, STREAM stream, UNLESS-HIDDEN, and NO-ERROR are optional:

Syntax
DISPLAY [ STREAM stream ] [ UNLESS-HIDDEN ] [ NO-ERROR ] 

In this example, the outer (small) brackets are part of the language, and the inner (large) brackets denote an optional item:

Syntax
INITIAL [ constant [ , constant ] ] 

A called external procedure must use braces when referencing compile-time arguments passed by a calling procedure, as shown in this example:

Syntax
{ &argument-name } 

In this example, EACH, FIRST, and LAST are optional, but you can choose only one of them:

Syntax
PRESELECT [ EACH | FIRST | LAST ] record-phrase 

In this example, you must include two expressions, and optionally you can include more. Multiple expressions are separated by commas:

Syntax
MAXIMUM ( expression , expression [ , expression ] ... ) 

In this example, you must specify MESSAGE and at least one expression or SKIP [ (n) ], and any number of additional expression or SKIP [ ( n ) ] is allowed:

Syntax
MESSAGE { expression | SKIP [ ( n ) ] } ... 

In this example, you must specify {include-file, then optionally any number of argument or &argument-name = "argument-value", and then terminate with }:

Syntax
{ include-file 
    [ argument | &argument-name = "argument-value" ] ... } 

Long syntax descriptions split across lines

Some syntax descriptions are too long to fit on one line. When syntax descriptions are split across multiple lines, groups of optional and groups of required items are kept together in the required order.

In this example, WITH is followed by six optional items:

Syntax
WITH [ ACCUM max-length ] [ expression DOWN ] 
  [ CENTERED ] [ n COLUMNS ] [ SIDE-LABELS ]
  [ STREAM-IO ] 

Complex syntax descriptions with both required and optional elements

Some syntax descriptions are too complex to distinguish required and optional elements by bracketing only the optional elements. For such syntax, the descriptions include both braces (for required elements) and brackets (for optional elements).

In this example, ASSIGN requires either one or more field entries or one record. Options available with field or record are grouped with braces and brackets:

Syntax
ASSIGN   { [ FRAME frame ] { field [ = expression ] }
            [ WHEN expression ] } ...
       | { record [ EXCEPT field ... ] } 

Example Web objects

The installation of OpenEdge Studio or WebSpeed Workshop includes a number of example Web objects that are mentioned in this manual.

To run the example Web objects mentioned in this manual, do the following from the AppBuilder:

  1. Select Tools Database Connections and connect to the sample sports2000 database.
  2. Select Options Preferences, click on the WebSpeed tab, and specify your Web browser and your broker URL.
  3. Select Tools WebTools and then select File Tools from the left frame of the browser window.
  4. From the File Tools interface navigate to install-path/src/web/examples. You will see the example Web objects in a file list and you can view or run them.
  5. Note: Avoid accidentally overwriting the example files. If you want to edit or compile any of the files in the examples directory, be sure to make a working copy of the examples directory.

OpenEdge messages

OpenEdge displays several types of messages to inform you of routine and unusual occurrences:

After displaying a message, OpenEdge proceeds in one of several ways:

OpenEdge messages end with a message number in parentheses. In this example, the message number is 200:

** Unknown table name table. (200) 

If you encounter an error that terminates OpenEdge, note the message number before restarting.

Obtaining more information about OpenEdge messages

On Windows platforms, use OpenEdge online help to obtain more information about OpenEdge messages. Many OpenEdge tools include the following Help menu options to provide information about messages:

In UNIX platforms, use the Progress pro command to start a single-user mode character OpenEdge client session and view a brief description of a message by providing its number.

To use the pro command to obtain a message description by message number:

  1. Start the Progress Procedure Editor:
  2. install-dir/dlc/bin/pro 
    

  3. Press F3 to access the menu bar, then choose Help Messages.
  4. Type the message number and press ENTER. Details about that message number appear.
  5. Press F4 to close the message, press F3 to access the Progress Procedure Editor menu, and choose File Exit.

Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095